<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<!--Converted with LaTeX2HTML 98.1 release (February 19th, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->


<title>Goldbach's Conjecture (II)</title>
<meta name="description" content="Goldbach's Conjecture (II)">
<meta name="keywords" content="htmlatex">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="STYLESHEET" href="acm-00686_archivos/htmlatex.css">
</head><body bgcolor="#ffffff" lang="EN">

<h1><br clear="ALL"><center><table bgcolor="#0060f0"><tbody><tr><td><b><font color="#c0ffff" size="5">&nbsp;<a name="SECTION0001000000000000000000">
Goldbach's Conjecture (II)</a>&nbsp;</font></b></td></tr></tbody></table></center>
</h1>

<p>
<b>Goldbach's Conjecture:</b> For any even number <i>n</i> greater than or equal to 4, there exists at least one pair of prime numbers <i>p</i><sub>1</sub> and <i>p</i><sub>2</sub> such that 

<!-- MATH: $n = p_1 + p_2$ -->
<i>n</i> = <i>p</i><sub>1</sub> + <i>p</i><sub>2</sub>.

</p><p>

</p><p>
<br>
This conjecture has not been proved nor refused yet. No one is sure whether this conjecture
actually holds. However, one can find such a pair of prime numbers, if any, for a given even
number. The problem here is to write a program that reports the number of all the pairs of
prime numbers satisfying the condition in the conjecture for a given even number.

</p><p>

</p><p>
<br>
A sequence of even numbers is given as input. Corresponding to each number, the program
should output the number of pairs mentioned above. Notice that we are interested in the
number of essentially different pairs and therefore you should not count 

<!-- MATH: $(p_1, p_2)$ -->
(<i>p</i><sub>1</sub>, <i>p</i><sub>2</sub>) and 
<!-- MATH: $(p_2, p_1)$ -->
(<i>p</i><sub>2</sub>, <i>p</i><sub>1</sub>) separately as two different pairs.

</p><p>

</p><h2><font color="#0070e8"><a name="SECTION0001001000000000000000">
Input</a>&nbsp;</font>
</h2>
An integer is given in each input line. You may assume that each integer is even, and is greater
than or equal to 4 and less than 2<sup>15</sup>. The end of the input is indicated by a number 0.

<p>

</p><h2><font color="#0070e8"><a name="SECTION0001002000000000000000">
Output</a>&nbsp;</font>
</h2>
Each output line should contain an integer number. No other characters should appear in the output.

<p>

</p><h2><font color="#0070e8"><a name="SECTION0001003000000000000000">
Sample Input</a>&nbsp;</font>
</h2>

<p>
</p><pre>6
10
12
0
</pre>

<p>

</p><h2><font color="#0070e8"><a name="SECTION0001004000000000000000">
Sample Output</a>&nbsp;</font>
</h2>
				
<pre>1
2
1
</pre>

<p>

</p><p>
<br></p><hr>
<address>
<i>Miguel A. Revilla</i>
<br><i>1999-03-05</i>
</address>
</body></html>